#include <iostream>

using namespace std;
class Animal{
    public:
    void eat(){
        cout<<"动物吃"<<endl;
    }
    int age;
   
    private:
    void run(){
        cout<<"动物跑"<<endl;
    }
    float weight;
    protected:
    void sleep(){
        cout<<"动物睡觉"<<endl;
    }
    int color;
    
};
class Cat:protected Animal{
    public:
    void fun(){
        eat();
        age = 5;
        cout<<age<<endl;

        sleep();
        color = 3;
        cout<<color<<endl;

    }
};

int main(int argc, char const *argv[])
{
    Cat c1;
    c1.fun();
    return 0;
}
